package com.greendao.lib;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class generator {
    public static void main(String[] args) throws Exception {

        //初始化数据库 版本号与生成代码路径
        Schema schema = new Schema(1, "com.green.dao");
        //创建实体类
        Entity entity = schema.addEntity("userInfo");
        //创建实体类字段
        entity.addStringProperty("name");
//        ....
        //分别指数据库与生成代路径
        new DaoGenerator().generateAll(schema, "../Dagger2mvp/app/src/main/java-gen");
    }
}
